<?php
class MainAction extends Action {
	public function index(){
		$tmp=LoginAction::log(session('account'), session('password'));
		if(session('account')==''||session('password')==''||!tmp)
			$this->redirect('Login/index',array('error'=>2));
		$this->assign('user',session('user'));
		$this->display();
	}
	public function logout()
	{
		session_destroy();
		$this->redirect('Login/index');
	}
}

?>